YES(O(1),O(n^1))

We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).

Strict Trs:
  { a__and(X1, X2) -> and(X1, X2)
  , a__and(true(), X) -> mark(X)
  , a__and(false(), Y) -> false()
  , mark(true()) -> true()
  , mark(false()) -> false()
  , mark(0()) -> 0()
  , mark(s(X)) -> s(X)
  , mark(add(X1, X2)) -> a__add(mark(X1), X2)
  , mark(nil()) -> nil()
  , mark(cons(X1, X2)) -> cons(X1, X2)
  , mark(first(X1, X2)) -> a__first(mark(X1), mark(X2))
  , mark(from(X)) -> a__from(X)
  , mark(and(X1, X2)) -> a__and(mark(X1), X2)
  , mark(if(X1, X2, X3)) -> a__if(mark(X1), X2, X3)
  , a__if(X1, X2, X3) -> if(X1, X2, X3)
  , a__if(true(), X, Y) -> mark(X)
  , a__if(false(), X, Y) -> mark(Y)
  , a__add(X1, X2) -> add(X1, X2)
  , a__add(0(), X) -> mark(X)
  , a__add(s(X), Y) -> s(add(X, Y))
  , a__first(X1, X2) -> first(X1, X2)
  , a__first(0(), X) -> nil()
  , a__first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
  , a__from(X) -> cons(X, from(s(X)))
  , a__from(X) -> from(X) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^1))

We use the processor 'matrix interpretation of dimension 1' to
orient following rules strictly.

Trs:
  { mark(0()) -> 0()
  , mark(add(X1, X2)) -> a__add(mark(X1), X2)
  , a__add(X1, X2) -> add(X1, X2)
  , a__add(0(), X) -> mark(X)
  , a__add(s(X), Y) -> s(add(X, Y))
  , a__first(0(), X) -> nil() }

The induced complexity on above rules (modulo remaining rules) is
YES(?,O(n^1)) . These rules are moved into the corresponding weak
component(s).

Sub-proof:
----------
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA).
  
       [a__and](x1, x2) = [1] x1 + [2] x2 + [0]         
                                                        
                 [true] = [0]                           
                                                        
             [mark](x1) = [2] x1 + [0]                  
                                                        
                [false] = [0]                           
                                                        
    [a__if](x1, x2, x3) = [1] x1 + [2] x2 + [2] x3 + [0]
                                                        
       [a__add](x1, x2) = [1] x1 + [2] x2 + [3]         
                                                        
                    [0] = [2]                           
                                                        
                [s](x1) = [1] x1 + [0]                  
                                                        
          [add](x1, x2) = [1] x1 + [1] x2 + [2]         
                                                        
     [a__first](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
                  [nil] = [0]                           
                                                        
         [cons](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
        [first](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
          [a__from](x1) = [2] x1 + [0]                  
                                                        
             [from](x1) = [1] x1 + [0]                  
                                                        
          [and](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
       [if](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [0]
  
  This order satisfies the following ordering constraints:
  
                [a__and(X1, X2)] =  [1] X1 + [2] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [and(X1, X2)]                 
                                                                  
             [a__and(true(), X)] =  [2] X + [0]                   
                                 >= [2] X + [0]                   
                                 =  [mark(X)]                     
                                                                  
            [a__and(false(), Y)] =  [2] Y + [0]                   
                                 >= [0]                           
                                 =  [false()]                     
                                                                  
                  [mark(true())] =  [0]                           
                                 >= [0]                           
                                 =  [true()]                      
                                                                  
                 [mark(false())] =  [0]                           
                                 >= [0]                           
                                 =  [false()]                     
                                                                  
                     [mark(0())] =  [4]                           
                                 >  [2]                           
                                 =  [0()]                         
                                                                  
                    [mark(s(X))] =  [2] X + [0]                   
                                 >= [1] X + [0]                   
                                 =  [s(X)]                        
                                                                  
             [mark(add(X1, X2))] =  [2] X1 + [2] X2 + [4]         
                                 >  [2] X1 + [2] X2 + [3]         
                                 =  [a__add(mark(X1), X2)]        
                                                                  
                   [mark(nil())] =  [0]                           
                                 >= [0]                           
                                 =  [nil()]                       
                                                                  
            [mark(cons(X1, X2))] =  [2] X1 + [2] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [cons(X1, X2)]                
                                                                  
           [mark(first(X1, X2))] =  [2] X1 + [2] X2 + [0]         
                                 >= [2] X1 + [2] X2 + [0]         
                                 =  [a__first(mark(X1), mark(X2))]
                                                                  
                 [mark(from(X))] =  [2] X + [0]                   
                                 >= [2] X + [0]                   
                                 =  [a__from(X)]                  
                                                                  
             [mark(and(X1, X2))] =  [2] X1 + [2] X2 + [0]         
                                 >= [2] X1 + [2] X2 + [0]         
                                 =  [a__and(mark(X1), X2)]        
                                                                  
          [mark(if(X1, X2, X3))] =  [2] X1 + [2] X2 + [2] X3 + [0]
                                 >= [2] X1 + [2] X2 + [2] X3 + [0]
                                 =  [a__if(mark(X1), X2, X3)]     
                                                                  
             [a__if(X1, X2, X3)] =  [1] X1 + [2] X2 + [2] X3 + [0]
                                 >= [1] X1 + [1] X2 + [1] X3 + [0]
                                 =  [if(X1, X2, X3)]              
                                                                  
           [a__if(true(), X, Y)] =  [2] X + [2] Y + [0]           
                                 >= [2] X + [0]                   
                                 =  [mark(X)]                     
                                                                  
          [a__if(false(), X, Y)] =  [2] X + [2] Y + [0]           
                                 >= [2] Y + [0]                   
                                 =  [mark(Y)]                     
                                                                  
                [a__add(X1, X2)] =  [1] X1 + [2] X2 + [3]         
                                 >  [1] X1 + [1] X2 + [2]         
                                 =  [add(X1, X2)]                 
                                                                  
                [a__add(0(), X)] =  [2] X + [5]                   
                                 >  [2] X + [0]                   
                                 =  [mark(X)]                     
                                                                  
               [a__add(s(X), Y)] =  [1] X + [2] Y + [3]           
                                 >  [1] X + [1] Y + [2]           
                                 =  [s(add(X, Y))]                
                                                                  
              [a__first(X1, X2)] =  [1] X1 + [1] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [first(X1, X2)]               
                                                                  
              [a__first(0(), X)] =  [1] X + [2]                   
                                 >  [0]                           
                                 =  [nil()]                       
                                                                  
    [a__first(s(X), cons(Y, Z))] =  [1] X + [1] Y + [1] Z + [0]   
                                 >= [1] X + [1] Y + [1] Z + [0]   
                                 =  [cons(Y, first(X, Z))]        
                                                                  
                    [a__from(X)] =  [2] X + [0]                   
                                 >= [2] X + [0]                   
                                 =  [cons(X, from(s(X)))]         
                                                                  
                    [a__from(X)] =  [2] X + [0]                   
                                 >= [1] X + [0]                   
                                 =  [from(X)]                     
                                                                  

We return to the main proof.

We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).

Strict Trs:
  { a__and(X1, X2) -> and(X1, X2)
  , a__and(true(), X) -> mark(X)
  , a__and(false(), Y) -> false()
  , mark(true()) -> true()
  , mark(false()) -> false()
  , mark(s(X)) -> s(X)
  , mark(nil()) -> nil()
  , mark(cons(X1, X2)) -> cons(X1, X2)
  , mark(first(X1, X2)) -> a__first(mark(X1), mark(X2))
  , mark(from(X)) -> a__from(X)
  , mark(and(X1, X2)) -> a__and(mark(X1), X2)
  , mark(if(X1, X2, X3)) -> a__if(mark(X1), X2, X3)
  , a__if(X1, X2, X3) -> if(X1, X2, X3)
  , a__if(true(), X, Y) -> mark(X)
  , a__if(false(), X, Y) -> mark(Y)
  , a__first(X1, X2) -> first(X1, X2)
  , a__first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
  , a__from(X) -> cons(X, from(s(X)))
  , a__from(X) -> from(X) }
Weak Trs:
  { mark(0()) -> 0()
  , mark(add(X1, X2)) -> a__add(mark(X1), X2)
  , a__add(X1, X2) -> add(X1, X2)
  , a__add(0(), X) -> mark(X)
  , a__add(s(X), Y) -> s(add(X, Y))
  , a__first(0(), X) -> nil() }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^1))

We use the processor 'matrix interpretation of dimension 1' to
orient following rules strictly.

Trs: { mark(nil()) -> nil() }

The induced complexity on above rules (modulo remaining rules) is
YES(?,O(n^1)) . These rules are moved into the corresponding weak
component(s).

Sub-proof:
----------
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA).
  
       [a__and](x1, x2) = [1] x1 + [2] x2 + [0]         
                                                        
                 [true] = [0]                           
                                                        
             [mark](x1) = [2] x1 + [0]                  
                                                        
                [false] = [0]                           
                                                        
    [a__if](x1, x2, x3) = [1] x1 + [2] x2 + [2] x3 + [0]
                                                        
       [a__add](x1, x2) = [1] x1 + [2] x2 + [3]         
                                                        
                    [0] = [2]                           
                                                        
                [s](x1) = [1] x1 + [0]                  
                                                        
          [add](x1, x2) = [1] x1 + [1] x2 + [2]         
                                                        
     [a__first](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
                  [nil] = [2]                           
                                                        
         [cons](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
        [first](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
          [a__from](x1) = [2] x1 + [0]                  
                                                        
             [from](x1) = [1] x1 + [0]                  
                                                        
          [and](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
       [if](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [0]
  
  This order satisfies the following ordering constraints:
  
                [a__and(X1, X2)] =  [1] X1 + [2] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [and(X1, X2)]                 
                                                                  
             [a__and(true(), X)] =  [2] X + [0]                   
                                 >= [2] X + [0]                   
                                 =  [mark(X)]                     
                                                                  
            [a__and(false(), Y)] =  [2] Y + [0]                   
                                 >= [0]                           
                                 =  [false()]                     
                                                                  
                  [mark(true())] =  [0]                           
                                 >= [0]                           
                                 =  [true()]                      
                                                                  
                 [mark(false())] =  [0]                           
                                 >= [0]                           
                                 =  [false()]                     
                                                                  
                     [mark(0())] =  [4]                           
                                 >  [2]                           
                                 =  [0()]                         
                                                                  
                    [mark(s(X))] =  [2] X + [0]                   
                                 >= [1] X + [0]                   
                                 =  [s(X)]                        
                                                                  
             [mark(add(X1, X2))] =  [2] X1 + [2] X2 + [4]         
                                 >  [2] X1 + [2] X2 + [3]         
                                 =  [a__add(mark(X1), X2)]        
                                                                  
                   [mark(nil())] =  [4]                           
                                 >  [2]                           
                                 =  [nil()]                       
                                                                  
            [mark(cons(X1, X2))] =  [2] X1 + [2] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [cons(X1, X2)]                
                                                                  
           [mark(first(X1, X2))] =  [2] X1 + [2] X2 + [0]         
                                 >= [2] X1 + [2] X2 + [0]         
                                 =  [a__first(mark(X1), mark(X2))]
                                                                  
                 [mark(from(X))] =  [2] X + [0]                   
                                 >= [2] X + [0]                   
                                 =  [a__from(X)]                  
                                                                  
             [mark(and(X1, X2))] =  [2] X1 + [2] X2 + [0]         
                                 >= [2] X1 + [2] X2 + [0]         
                                 =  [a__and(mark(X1), X2)]        
                                                                  
          [mark(if(X1, X2, X3))] =  [2] X1 + [2] X2 + [2] X3 + [0]
                                 >= [2] X1 + [2] X2 + [2] X3 + [0]
                                 =  [a__if(mark(X1), X2, X3)]     
                                                                  
             [a__if(X1, X2, X3)] =  [1] X1 + [2] X2 + [2] X3 + [0]
                                 >= [1] X1 + [1] X2 + [1] X3 + [0]
                                 =  [if(X1, X2, X3)]              
                                                                  
           [a__if(true(), X, Y)] =  [2] X + [2] Y + [0]           
                                 >= [2] X + [0]                   
                                 =  [mark(X)]                     
                                                                  
          [a__if(false(), X, Y)] =  [2] X + [2] Y + [0]           
                                 >= [2] Y + [0]                   
                                 =  [mark(Y)]                     
                                                                  
                [a__add(X1, X2)] =  [1] X1 + [2] X2 + [3]         
                                 >  [1] X1 + [1] X2 + [2]         
                                 =  [add(X1, X2)]                 
                                                                  
                [a__add(0(), X)] =  [2] X + [5]                   
                                 >  [2] X + [0]                   
                                 =  [mark(X)]                     
                                                                  
               [a__add(s(X), Y)] =  [1] X + [2] Y + [3]           
                                 >  [1] X + [1] Y + [2]           
                                 =  [s(add(X, Y))]                
                                                                  
              [a__first(X1, X2)] =  [1] X1 + [1] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [first(X1, X2)]               
                                                                  
              [a__first(0(), X)] =  [1] X + [2]                   
                                 >= [2]                           
                                 =  [nil()]                       
                                                                  
    [a__first(s(X), cons(Y, Z))] =  [1] X + [1] Y + [1] Z + [0]   
                                 >= [1] X + [1] Y + [1] Z + [0]   
                                 =  [cons(Y, first(X, Z))]        
                                                                  
                    [a__from(X)] =  [2] X + [0]                   
                                 >= [2] X + [0]                   
                                 =  [cons(X, from(s(X)))]         
                                                                  
                    [a__from(X)] =  [2] X + [0]                   
                                 >= [1] X + [0]                   
                                 =  [from(X)]                     
                                                                  

We return to the main proof.

We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).

Strict Trs:
  { a__and(X1, X2) -> and(X1, X2)
  , a__and(true(), X) -> mark(X)
  , a__and(false(), Y) -> false()
  , mark(true()) -> true()
  , mark(false()) -> false()
  , mark(s(X)) -> s(X)
  , mark(cons(X1, X2)) -> cons(X1, X2)
  , mark(first(X1, X2)) -> a__first(mark(X1), mark(X2))
  , mark(from(X)) -> a__from(X)
  , mark(and(X1, X2)) -> a__and(mark(X1), X2)
  , mark(if(X1, X2, X3)) -> a__if(mark(X1), X2, X3)
  , a__if(X1, X2, X3) -> if(X1, X2, X3)
  , a__if(true(), X, Y) -> mark(X)
  , a__if(false(), X, Y) -> mark(Y)
  , a__first(X1, X2) -> first(X1, X2)
  , a__first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
  , a__from(X) -> cons(X, from(s(X)))
  , a__from(X) -> from(X) }
Weak Trs:
  { mark(0()) -> 0()
  , mark(add(X1, X2)) -> a__add(mark(X1), X2)
  , mark(nil()) -> nil()
  , a__add(X1, X2) -> add(X1, X2)
  , a__add(0(), X) -> mark(X)
  , a__add(s(X), Y) -> s(add(X, Y))
  , a__first(0(), X) -> nil() }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^1))

We use the processor 'matrix interpretation of dimension 1' to
orient following rules strictly.

Trs: { mark(from(X)) -> a__from(X) }

The induced complexity on above rules (modulo remaining rules) is
YES(?,O(n^1)) . These rules are moved into the corresponding weak
component(s).

Sub-proof:
----------
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA).
  
       [a__and](x1, x2) = [1] x1 + [2] x2 + [0]         
                                                        
                 [true] = [0]                           
                                                        
             [mark](x1) = [2] x1 + [0]                  
                                                        
                [false] = [0]                           
                                                        
    [a__if](x1, x2, x3) = [1] x1 + [2] x2 + [2] x3 + [0]
                                                        
       [a__add](x1, x2) = [1] x1 + [2] x2 + [0]         
                                                        
                    [0] = [3]                           
                                                        
                [s](x1) = [1] x1 + [0]                  
                                                        
          [add](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
     [a__first](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
                  [nil] = [3]                           
                                                        
         [cons](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
        [first](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
          [a__from](x1) = [2] x1 + [2]                  
                                                        
             [from](x1) = [1] x1 + [2]                  
                                                        
          [and](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
       [if](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [0]
  
  This order satisfies the following ordering constraints:
  
                [a__and(X1, X2)] =  [1] X1 + [2] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [and(X1, X2)]                 
                                                                  
             [a__and(true(), X)] =  [2] X + [0]                   
                                 >= [2] X + [0]                   
                                 =  [mark(X)]                     
                                                                  
            [a__and(false(), Y)] =  [2] Y + [0]                   
                                 >= [0]                           
                                 =  [false()]                     
                                                                  
                  [mark(true())] =  [0]                           
                                 >= [0]                           
                                 =  [true()]                      
                                                                  
                 [mark(false())] =  [0]                           
                                 >= [0]                           
                                 =  [false()]                     
                                                                  
                     [mark(0())] =  [6]                           
                                 >  [3]                           
                                 =  [0()]                         
                                                                  
                    [mark(s(X))] =  [2] X + [0]                   
                                 >= [1] X + [0]                   
                                 =  [s(X)]                        
                                                                  
             [mark(add(X1, X2))] =  [2] X1 + [2] X2 + [0]         
                                 >= [2] X1 + [2] X2 + [0]         
                                 =  [a__add(mark(X1), X2)]        
                                                                  
                   [mark(nil())] =  [6]                           
                                 >  [3]                           
                                 =  [nil()]                       
                                                                  
            [mark(cons(X1, X2))] =  [2] X1 + [2] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [cons(X1, X2)]                
                                                                  
           [mark(first(X1, X2))] =  [2] X1 + [2] X2 + [0]         
                                 >= [2] X1 + [2] X2 + [0]         
                                 =  [a__first(mark(X1), mark(X2))]
                                                                  
                 [mark(from(X))] =  [2] X + [4]                   
                                 >  [2] X + [2]                   
                                 =  [a__from(X)]                  
                                                                  
             [mark(and(X1, X2))] =  [2] X1 + [2] X2 + [0]         
                                 >= [2] X1 + [2] X2 + [0]         
                                 =  [a__and(mark(X1), X2)]        
                                                                  
          [mark(if(X1, X2, X3))] =  [2] X1 + [2] X2 + [2] X3 + [0]
                                 >= [2] X1 + [2] X2 + [2] X3 + [0]
                                 =  [a__if(mark(X1), X2, X3)]     
                                                                  
             [a__if(X1, X2, X3)] =  [1] X1 + [2] X2 + [2] X3 + [0]
                                 >= [1] X1 + [1] X2 + [1] X3 + [0]
                                 =  [if(X1, X2, X3)]              
                                                                  
           [a__if(true(), X, Y)] =  [2] X + [2] Y + [0]           
                                 >= [2] X + [0]                   
                                 =  [mark(X)]                     
                                                                  
          [a__if(false(), X, Y)] =  [2] X + [2] Y + [0]           
                                 >= [2] Y + [0]                   
                                 =  [mark(Y)]                     
                                                                  
                [a__add(X1, X2)] =  [1] X1 + [2] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [add(X1, X2)]                 
                                                                  
                [a__add(0(), X)] =  [2] X + [3]                   
                                 >  [2] X + [0]                   
                                 =  [mark(X)]                     
                                                                  
               [a__add(s(X), Y)] =  [1] X + [2] Y + [0]           
                                 >= [1] X + [1] Y + [0]           
                                 =  [s(add(X, Y))]                
                                                                  
              [a__first(X1, X2)] =  [1] X1 + [1] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [first(X1, X2)]               
                                                                  
              [a__first(0(), X)] =  [1] X + [3]                   
                                 >= [3]                           
                                 =  [nil()]                       
                                                                  
    [a__first(s(X), cons(Y, Z))] =  [1] X + [1] Y + [1] Z + [0]   
                                 >= [1] X + [1] Y + [1] Z + [0]   
                                 =  [cons(Y, first(X, Z))]        
                                                                  
                    [a__from(X)] =  [2] X + [2]                   
                                 >= [2] X + [2]                   
                                 =  [cons(X, from(s(X)))]         
                                                                  
                    [a__from(X)] =  [2] X + [2]                   
                                 >= [1] X + [2]                   
                                 =  [from(X)]                     
                                                                  

We return to the main proof.

We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).

Strict Trs:
  { a__and(X1, X2) -> and(X1, X2)
  , a__and(true(), X) -> mark(X)
  , a__and(false(), Y) -> false()
  , mark(true()) -> true()
  , mark(false()) -> false()
  , mark(s(X)) -> s(X)
  , mark(cons(X1, X2)) -> cons(X1, X2)
  , mark(first(X1, X2)) -> a__first(mark(X1), mark(X2))
  , mark(and(X1, X2)) -> a__and(mark(X1), X2)
  , mark(if(X1, X2, X3)) -> a__if(mark(X1), X2, X3)
  , a__if(X1, X2, X3) -> if(X1, X2, X3)
  , a__if(true(), X, Y) -> mark(X)
  , a__if(false(), X, Y) -> mark(Y)
  , a__first(X1, X2) -> first(X1, X2)
  , a__first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
  , a__from(X) -> cons(X, from(s(X)))
  , a__from(X) -> from(X) }
Weak Trs:
  { mark(0()) -> 0()
  , mark(add(X1, X2)) -> a__add(mark(X1), X2)
  , mark(nil()) -> nil()
  , mark(from(X)) -> a__from(X)
  , a__add(X1, X2) -> add(X1, X2)
  , a__add(0(), X) -> mark(X)
  , a__add(s(X), Y) -> s(add(X, Y))
  , a__first(0(), X) -> nil() }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^1))

We use the processor 'matrix interpretation of dimension 1' to
orient following rules strictly.

Trs:
  { a__from(X) -> cons(X, from(s(X)))
  , a__from(X) -> from(X) }

The induced complexity on above rules (modulo remaining rules) is
YES(?,O(n^1)) . These rules are moved into the corresponding weak
component(s).

Sub-proof:
----------
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA).
  
       [a__and](x1, x2) = [1] x1 + [2] x2 + [0]         
                                                        
                 [true] = [0]                           
                                                        
             [mark](x1) = [2] x1 + [0]                  
                                                        
                [false] = [0]                           
                                                        
    [a__if](x1, x2, x3) = [1] x1 + [2] x2 + [2] x3 + [0]
                                                        
       [a__add](x1, x2) = [1] x1 + [2] x2 + [0]         
                                                        
                    [0] = [3]                           
                                                        
                [s](x1) = [1] x1 + [0]                  
                                                        
          [add](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
     [a__first](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
                  [nil] = [3]                           
                                                        
         [cons](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
        [first](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
          [a__from](x1) = [2] x1 + [3]                  
                                                        
             [from](x1) = [1] x1 + [2]                  
                                                        
          [and](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
       [if](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [0]
  
  This order satisfies the following ordering constraints:
  
                [a__and(X1, X2)] =  [1] X1 + [2] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [and(X1, X2)]                 
                                                                  
             [a__and(true(), X)] =  [2] X + [0]                   
                                 >= [2] X + [0]                   
                                 =  [mark(X)]                     
                                                                  
            [a__and(false(), Y)] =  [2] Y + [0]                   
                                 >= [0]                           
                                 =  [false()]                     
                                                                  
                  [mark(true())] =  [0]                           
                                 >= [0]                           
                                 =  [true()]                      
                                                                  
                 [mark(false())] =  [0]                           
                                 >= [0]                           
                                 =  [false()]                     
                                                                  
                     [mark(0())] =  [6]                           
                                 >  [3]                           
                                 =  [0()]                         
                                                                  
                    [mark(s(X))] =  [2] X + [0]                   
                                 >= [1] X + [0]                   
                                 =  [s(X)]                        
                                                                  
             [mark(add(X1, X2))] =  [2] X1 + [2] X2 + [0]         
                                 >= [2] X1 + [2] X2 + [0]         
                                 =  [a__add(mark(X1), X2)]        
                                                                  
                   [mark(nil())] =  [6]                           
                                 >  [3]                           
                                 =  [nil()]                       
                                                                  
            [mark(cons(X1, X2))] =  [2] X1 + [2] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [cons(X1, X2)]                
                                                                  
           [mark(first(X1, X2))] =  [2] X1 + [2] X2 + [0]         
                                 >= [2] X1 + [2] X2 + [0]         
                                 =  [a__first(mark(X1), mark(X2))]
                                                                  
                 [mark(from(X))] =  [2] X + [4]                   
                                 >  [2] X + [3]                   
                                 =  [a__from(X)]                  
                                                                  
             [mark(and(X1, X2))] =  [2] X1 + [2] X2 + [0]         
                                 >= [2] X1 + [2] X2 + [0]         
                                 =  [a__and(mark(X1), X2)]        
                                                                  
          [mark(if(X1, X2, X3))] =  [2] X1 + [2] X2 + [2] X3 + [0]
                                 >= [2] X1 + [2] X2 + [2] X3 + [0]
                                 =  [a__if(mark(X1), X2, X3)]     
                                                                  
             [a__if(X1, X2, X3)] =  [1] X1 + [2] X2 + [2] X3 + [0]
                                 >= [1] X1 + [1] X2 + [1] X3 + [0]
                                 =  [if(X1, X2, X3)]              
                                                                  
           [a__if(true(), X, Y)] =  [2] X + [2] Y + [0]           
                                 >= [2] X + [0]                   
                                 =  [mark(X)]                     
                                                                  
          [a__if(false(), X, Y)] =  [2] X + [2] Y + [0]           
                                 >= [2] Y + [0]                   
                                 =  [mark(Y)]                     
                                                                  
                [a__add(X1, X2)] =  [1] X1 + [2] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [add(X1, X2)]                 
                                                                  
                [a__add(0(), X)] =  [2] X + [3]                   
                                 >  [2] X + [0]                   
                                 =  [mark(X)]                     
                                                                  
               [a__add(s(X), Y)] =  [1] X + [2] Y + [0]           
                                 >= [1] X + [1] Y + [0]           
                                 =  [s(add(X, Y))]                
                                                                  
              [a__first(X1, X2)] =  [1] X1 + [1] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [first(X1, X2)]               
                                                                  
              [a__first(0(), X)] =  [1] X + [3]                   
                                 >= [3]                           
                                 =  [nil()]                       
                                                                  
    [a__first(s(X), cons(Y, Z))] =  [1] X + [1] Y + [1] Z + [0]   
                                 >= [1] X + [1] Y + [1] Z + [0]   
                                 =  [cons(Y, first(X, Z))]        
                                                                  
                    [a__from(X)] =  [2] X + [3]                   
                                 >  [2] X + [2]                   
                                 =  [cons(X, from(s(X)))]         
                                                                  
                    [a__from(X)] =  [2] X + [3]                   
                                 >  [1] X + [2]                   
                                 =  [from(X)]                     
                                                                  

We return to the main proof.

We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).

Strict Trs:
  { a__and(X1, X2) -> and(X1, X2)
  , a__and(true(), X) -> mark(X)
  , a__and(false(), Y) -> false()
  , mark(true()) -> true()
  , mark(false()) -> false()
  , mark(s(X)) -> s(X)
  , mark(cons(X1, X2)) -> cons(X1, X2)
  , mark(first(X1, X2)) -> a__first(mark(X1), mark(X2))
  , mark(and(X1, X2)) -> a__and(mark(X1), X2)
  , mark(if(X1, X2, X3)) -> a__if(mark(X1), X2, X3)
  , a__if(X1, X2, X3) -> if(X1, X2, X3)
  , a__if(true(), X, Y) -> mark(X)
  , a__if(false(), X, Y) -> mark(Y)
  , a__first(X1, X2) -> first(X1, X2)
  , a__first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z)) }
Weak Trs:
  { mark(0()) -> 0()
  , mark(add(X1, X2)) -> a__add(mark(X1), X2)
  , mark(nil()) -> nil()
  , mark(from(X)) -> a__from(X)
  , a__add(X1, X2) -> add(X1, X2)
  , a__add(0(), X) -> mark(X)
  , a__add(s(X), Y) -> s(add(X, Y))
  , a__first(0(), X) -> nil()
  , a__from(X) -> cons(X, from(s(X)))
  , a__from(X) -> from(X) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^1))

We use the processor 'matrix interpretation of dimension 1' to
orient following rules strictly.

Trs:
  { mark(first(X1, X2)) -> a__first(mark(X1), mark(X2))
  , a__first(X1, X2) -> first(X1, X2)
  , a__first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z)) }

The induced complexity on above rules (modulo remaining rules) is
YES(?,O(n^1)) . These rules are moved into the corresponding weak
component(s).

Sub-proof:
----------
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA).
  
       [a__and](x1, x2) = [1] x1 + [2] x2 + [0]         
                                                        
                 [true] = [0]                           
                                                        
             [mark](x1) = [2] x1 + [0]                  
                                                        
                [false] = [0]                           
                                                        
    [a__if](x1, x2, x3) = [1] x1 + [2] x2 + [2] x3 + [0]
                                                        
       [a__add](x1, x2) = [1] x1 + [2] x2 + [0]         
                                                        
                    [0] = [3]                           
                                                        
                [s](x1) = [1] x1 + [0]                  
                                                        
          [add](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
     [a__first](x1, x2) = [1] x1 + [1] x2 + [3]         
                                                        
                  [nil] = [3]                           
                                                        
         [cons](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
        [first](x1, x2) = [1] x1 + [1] x2 + [2]         
                                                        
          [a__from](x1) = [2] x1 + [0]                  
                                                        
             [from](x1) = [1] x1 + [0]                  
                                                        
          [and](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
       [if](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [0]
  
  This order satisfies the following ordering constraints:
  
                [a__and(X1, X2)] =  [1] X1 + [2] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [and(X1, X2)]                 
                                                                  
             [a__and(true(), X)] =  [2] X + [0]                   
                                 >= [2] X + [0]                   
                                 =  [mark(X)]                     
                                                                  
            [a__and(false(), Y)] =  [2] Y + [0]                   
                                 >= [0]                           
                                 =  [false()]                     
                                                                  
                  [mark(true())] =  [0]                           
                                 >= [0]                           
                                 =  [true()]                      
                                                                  
                 [mark(false())] =  [0]                           
                                 >= [0]                           
                                 =  [false()]                     
                                                                  
                     [mark(0())] =  [6]                           
                                 >  [3]                           
                                 =  [0()]                         
                                                                  
                    [mark(s(X))] =  [2] X + [0]                   
                                 >= [1] X + [0]                   
                                 =  [s(X)]                        
                                                                  
             [mark(add(X1, X2))] =  [2] X1 + [2] X2 + [0]         
                                 >= [2] X1 + [2] X2 + [0]         
                                 =  [a__add(mark(X1), X2)]        
                                                                  
                   [mark(nil())] =  [6]                           
                                 >  [3]                           
                                 =  [nil()]                       
                                                                  
            [mark(cons(X1, X2))] =  [2] X1 + [2] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [cons(X1, X2)]                
                                                                  
           [mark(first(X1, X2))] =  [2] X1 + [2] X2 + [4]         
                                 >  [2] X1 + [2] X2 + [3]         
                                 =  [a__first(mark(X1), mark(X2))]
                                                                  
                 [mark(from(X))] =  [2] X + [0]                   
                                 >= [2] X + [0]                   
                                 =  [a__from(X)]                  
                                                                  
             [mark(and(X1, X2))] =  [2] X1 + [2] X2 + [0]         
                                 >= [2] X1 + [2] X2 + [0]         
                                 =  [a__and(mark(X1), X2)]        
                                                                  
          [mark(if(X1, X2, X3))] =  [2] X1 + [2] X2 + [2] X3 + [0]
                                 >= [2] X1 + [2] X2 + [2] X3 + [0]
                                 =  [a__if(mark(X1), X2, X3)]     
                                                                  
             [a__if(X1, X2, X3)] =  [1] X1 + [2] X2 + [2] X3 + [0]
                                 >= [1] X1 + [1] X2 + [1] X3 + [0]
                                 =  [if(X1, X2, X3)]              
                                                                  
           [a__if(true(), X, Y)] =  [2] X + [2] Y + [0]           
                                 >= [2] X + [0]                   
                                 =  [mark(X)]                     
                                                                  
          [a__if(false(), X, Y)] =  [2] X + [2] Y + [0]           
                                 >= [2] Y + [0]                   
                                 =  [mark(Y)]                     
                                                                  
                [a__add(X1, X2)] =  [1] X1 + [2] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [add(X1, X2)]                 
                                                                  
                [a__add(0(), X)] =  [2] X + [3]                   
                                 >  [2] X + [0]                   
                                 =  [mark(X)]                     
                                                                  
               [a__add(s(X), Y)] =  [1] X + [2] Y + [0]           
                                 >= [1] X + [1] Y + [0]           
                                 =  [s(add(X, Y))]                
                                                                  
              [a__first(X1, X2)] =  [1] X1 + [1] X2 + [3]         
                                 >  [1] X1 + [1] X2 + [2]         
                                 =  [first(X1, X2)]               
                                                                  
              [a__first(0(), X)] =  [1] X + [6]                   
                                 >  [3]                           
                                 =  [nil()]                       
                                                                  
    [a__first(s(X), cons(Y, Z))] =  [1] X + [1] Y + [1] Z + [3]   
                                 >  [1] X + [1] Y + [1] Z + [2]   
                                 =  [cons(Y, first(X, Z))]        
                                                                  
                    [a__from(X)] =  [2] X + [0]                   
                                 >= [2] X + [0]                   
                                 =  [cons(X, from(s(X)))]         
                                                                  
                    [a__from(X)] =  [2] X + [0]                   
                                 >= [1] X + [0]                   
                                 =  [from(X)]                     
                                                                  

We return to the main proof.

We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).

Strict Trs:
  { a__and(X1, X2) -> and(X1, X2)
  , a__and(true(), X) -> mark(X)
  , a__and(false(), Y) -> false()
  , mark(true()) -> true()
  , mark(false()) -> false()
  , mark(s(X)) -> s(X)
  , mark(cons(X1, X2)) -> cons(X1, X2)
  , mark(and(X1, X2)) -> a__and(mark(X1), X2)
  , mark(if(X1, X2, X3)) -> a__if(mark(X1), X2, X3)
  , a__if(X1, X2, X3) -> if(X1, X2, X3)
  , a__if(true(), X, Y) -> mark(X)
  , a__if(false(), X, Y) -> mark(Y) }
Weak Trs:
  { mark(0()) -> 0()
  , mark(add(X1, X2)) -> a__add(mark(X1), X2)
  , mark(nil()) -> nil()
  , mark(first(X1, X2)) -> a__first(mark(X1), mark(X2))
  , mark(from(X)) -> a__from(X)
  , a__add(X1, X2) -> add(X1, X2)
  , a__add(0(), X) -> mark(X)
  , a__add(s(X), Y) -> s(add(X, Y))
  , a__first(X1, X2) -> first(X1, X2)
  , a__first(0(), X) -> nil()
  , a__first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
  , a__from(X) -> cons(X, from(s(X)))
  , a__from(X) -> from(X) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^1))

We use the processor 'matrix interpretation of dimension 1' to
orient following rules strictly.

Trs:
  { mark(if(X1, X2, X3)) -> a__if(mark(X1), X2, X3)
  , a__if(X1, X2, X3) -> if(X1, X2, X3)
  , a__if(true(), X, Y) -> mark(X)
  , a__if(false(), X, Y) -> mark(Y) }

The induced complexity on above rules (modulo remaining rules) is
YES(?,O(n^1)) . These rules are moved into the corresponding weak
component(s).

Sub-proof:
----------
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA).
  
       [a__and](x1, x2) = [1] x1 + [2] x2 + [0]         
                                                        
                 [true] = [0]                           
                                                        
             [mark](x1) = [2] x1 + [0]                  
                                                        
                [false] = [0]                           
                                                        
    [a__if](x1, x2, x3) = [1] x1 + [2] x2 + [2] x3 + [3]
                                                        
       [a__add](x1, x2) = [1] x1 + [2] x2 + [0]         
                                                        
                    [0] = [3]                           
                                                        
                [s](x1) = [1] x1 + [0]                  
                                                        
          [add](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
     [a__first](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
                  [nil] = [3]                           
                                                        
         [cons](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
        [first](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
          [a__from](x1) = [2] x1 + [0]                  
                                                        
             [from](x1) = [1] x1 + [0]                  
                                                        
          [and](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
       [if](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [2]
  
  This order satisfies the following ordering constraints:
  
                [a__and(X1, X2)] =  [1] X1 + [2] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [and(X1, X2)]                 
                                                                  
             [a__and(true(), X)] =  [2] X + [0]                   
                                 >= [2] X + [0]                   
                                 =  [mark(X)]                     
                                                                  
            [a__and(false(), Y)] =  [2] Y + [0]                   
                                 >= [0]                           
                                 =  [false()]                     
                                                                  
                  [mark(true())] =  [0]                           
                                 >= [0]                           
                                 =  [true()]                      
                                                                  
                 [mark(false())] =  [0]                           
                                 >= [0]                           
                                 =  [false()]                     
                                                                  
                     [mark(0())] =  [6]                           
                                 >  [3]                           
                                 =  [0()]                         
                                                                  
                    [mark(s(X))] =  [2] X + [0]                   
                                 >= [1] X + [0]                   
                                 =  [s(X)]                        
                                                                  
             [mark(add(X1, X2))] =  [2] X1 + [2] X2 + [0]         
                                 >= [2] X1 + [2] X2 + [0]         
                                 =  [a__add(mark(X1), X2)]        
                                                                  
                   [mark(nil())] =  [6]                           
                                 >  [3]                           
                                 =  [nil()]                       
                                                                  
            [mark(cons(X1, X2))] =  [2] X1 + [2] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [cons(X1, X2)]                
                                                                  
           [mark(first(X1, X2))] =  [2] X1 + [2] X2 + [0]         
                                 >= [2] X1 + [2] X2 + [0]         
                                 =  [a__first(mark(X1), mark(X2))]
                                                                  
                 [mark(from(X))] =  [2] X + [0]                   
                                 >= [2] X + [0]                   
                                 =  [a__from(X)]                  
                                                                  
             [mark(and(X1, X2))] =  [2] X1 + [2] X2 + [0]         
                                 >= [2] X1 + [2] X2 + [0]         
                                 =  [a__and(mark(X1), X2)]        
                                                                  
          [mark(if(X1, X2, X3))] =  [2] X1 + [2] X2 + [2] X3 + [4]
                                 >  [2] X1 + [2] X2 + [2] X3 + [3]
                                 =  [a__if(mark(X1), X2, X3)]     
                                                                  
             [a__if(X1, X2, X3)] =  [1] X1 + [2] X2 + [2] X3 + [3]
                                 >  [1] X1 + [1] X2 + [1] X3 + [2]
                                 =  [if(X1, X2, X3)]              
                                                                  
           [a__if(true(), X, Y)] =  [2] X + [2] Y + [3]           
                                 >  [2] X + [0]                   
                                 =  [mark(X)]                     
                                                                  
          [a__if(false(), X, Y)] =  [2] X + [2] Y + [3]           
                                 >  [2] Y + [0]                   
                                 =  [mark(Y)]                     
                                                                  
                [a__add(X1, X2)] =  [1] X1 + [2] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [add(X1, X2)]                 
                                                                  
                [a__add(0(), X)] =  [2] X + [3]                   
                                 >  [2] X + [0]                   
                                 =  [mark(X)]                     
                                                                  
               [a__add(s(X), Y)] =  [1] X + [2] Y + [0]           
                                 >= [1] X + [1] Y + [0]           
                                 =  [s(add(X, Y))]                
                                                                  
              [a__first(X1, X2)] =  [1] X1 + [1] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [first(X1, X2)]               
                                                                  
              [a__first(0(), X)] =  [1] X + [3]                   
                                 >= [3]                           
                                 =  [nil()]                       
                                                                  
    [a__first(s(X), cons(Y, Z))] =  [1] X + [1] Y + [1] Z + [0]   
                                 >= [1] X + [1] Y + [1] Z + [0]   
                                 =  [cons(Y, first(X, Z))]        
                                                                  
                    [a__from(X)] =  [2] X + [0]                   
                                 >= [2] X + [0]                   
                                 =  [cons(X, from(s(X)))]         
                                                                  
                    [a__from(X)] =  [2] X + [0]                   
                                 >= [1] X + [0]                   
                                 =  [from(X)]                     
                                                                  

We return to the main proof.

We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).

Strict Trs:
  { a__and(X1, X2) -> and(X1, X2)
  , a__and(true(), X) -> mark(X)
  , a__and(false(), Y) -> false()
  , mark(true()) -> true()
  , mark(false()) -> false()
  , mark(s(X)) -> s(X)
  , mark(cons(X1, X2)) -> cons(X1, X2)
  , mark(and(X1, X2)) -> a__and(mark(X1), X2) }
Weak Trs:
  { mark(0()) -> 0()
  , mark(add(X1, X2)) -> a__add(mark(X1), X2)
  , mark(nil()) -> nil()
  , mark(first(X1, X2)) -> a__first(mark(X1), mark(X2))
  , mark(from(X)) -> a__from(X)
  , mark(if(X1, X2, X3)) -> a__if(mark(X1), X2, X3)
  , a__if(X1, X2, X3) -> if(X1, X2, X3)
  , a__if(true(), X, Y) -> mark(X)
  , a__if(false(), X, Y) -> mark(Y)
  , a__add(X1, X2) -> add(X1, X2)
  , a__add(0(), X) -> mark(X)
  , a__add(s(X), Y) -> s(add(X, Y))
  , a__first(X1, X2) -> first(X1, X2)
  , a__first(0(), X) -> nil()
  , a__first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
  , a__from(X) -> cons(X, from(s(X)))
  , a__from(X) -> from(X) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^1))

We use the processor 'matrix interpretation of dimension 1' to
orient following rules strictly.

Trs:
  { mark(true()) -> true()
  , mark(false()) -> false()
  , mark(s(X)) -> s(X)
  , mark(cons(X1, X2)) -> cons(X1, X2) }

The induced complexity on above rules (modulo remaining rules) is
YES(?,O(n^1)) . These rules are moved into the corresponding weak
component(s).

Sub-proof:
----------
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA).
  
       [a__and](x1, x2) = [1] x1 + [3] x2 + [0]         
                                                        
                 [true] = [1]                           
                                                        
             [mark](x1) = [3] x1 + [1]                  
                                                        
                [false] = [0]                           
                                                        
    [a__if](x1, x2, x3) = [1] x1 + [3] x2 + [3] x3 + [1]
                                                        
       [a__add](x1, x2) = [1] x1 + [3] x2 + [0]         
                                                        
                    [0] = [2]                           
                                                        
                [s](x1) = [1] x1 + [0]                  
                                                        
          [add](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
     [a__first](x1, x2) = [1] x1 + [1] x2 + [1]         
                                                        
                  [nil] = [1]                           
                                                        
         [cons](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
        [first](x1, x2) = [1] x1 + [1] x2 + [1]         
                                                        
          [a__from](x1) = [3] x1 + [0]                  
                                                        
             [from](x1) = [1] x1 + [0]                  
                                                        
          [and](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
       [if](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [1]
  
  This order satisfies the following ordering constraints:
  
                [a__and(X1, X2)] =  [1] X1 + [3] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [and(X1, X2)]                 
                                                                  
             [a__and(true(), X)] =  [3] X + [1]                   
                                 >= [3] X + [1]                   
                                 =  [mark(X)]                     
                                                                  
            [a__and(false(), Y)] =  [3] Y + [0]                   
                                 >= [0]                           
                                 =  [false()]                     
                                                                  
                  [mark(true())] =  [4]                           
                                 >  [1]                           
                                 =  [true()]                      
                                                                  
                 [mark(false())] =  [1]                           
                                 >  [0]                           
                                 =  [false()]                     
                                                                  
                     [mark(0())] =  [7]                           
                                 >  [2]                           
                                 =  [0()]                         
                                                                  
                    [mark(s(X))] =  [3] X + [1]                   
                                 >  [1] X + [0]                   
                                 =  [s(X)]                        
                                                                  
             [mark(add(X1, X2))] =  [3] X1 + [3] X2 + [1]         
                                 >= [3] X1 + [3] X2 + [1]         
                                 =  [a__add(mark(X1), X2)]        
                                                                  
                   [mark(nil())] =  [4]                           
                                 >  [1]                           
                                 =  [nil()]                       
                                                                  
            [mark(cons(X1, X2))] =  [3] X1 + [3] X2 + [1]         
                                 >  [1] X1 + [1] X2 + [0]         
                                 =  [cons(X1, X2)]                
                                                                  
           [mark(first(X1, X2))] =  [3] X1 + [3] X2 + [4]         
                                 >  [3] X1 + [3] X2 + [3]         
                                 =  [a__first(mark(X1), mark(X2))]
                                                                  
                 [mark(from(X))] =  [3] X + [1]                   
                                 >  [3] X + [0]                   
                                 =  [a__from(X)]                  
                                                                  
             [mark(and(X1, X2))] =  [3] X1 + [3] X2 + [1]         
                                 >= [3] X1 + [3] X2 + [1]         
                                 =  [a__and(mark(X1), X2)]        
                                                                  
          [mark(if(X1, X2, X3))] =  [3] X1 + [3] X2 + [3] X3 + [4]
                                 >  [3] X1 + [3] X2 + [3] X3 + [2]
                                 =  [a__if(mark(X1), X2, X3)]     
                                                                  
             [a__if(X1, X2, X3)] =  [1] X1 + [3] X2 + [3] X3 + [1]
                                 >= [1] X1 + [1] X2 + [1] X3 + [1]
                                 =  [if(X1, X2, X3)]              
                                                                  
           [a__if(true(), X, Y)] =  [3] X + [3] Y + [2]           
                                 >  [3] X + [1]                   
                                 =  [mark(X)]                     
                                                                  
          [a__if(false(), X, Y)] =  [3] X + [3] Y + [1]           
                                 >= [3] Y + [1]                   
                                 =  [mark(Y)]                     
                                                                  
                [a__add(X1, X2)] =  [1] X1 + [3] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [add(X1, X2)]                 
                                                                  
                [a__add(0(), X)] =  [3] X + [2]                   
                                 >  [3] X + [1]                   
                                 =  [mark(X)]                     
                                                                  
               [a__add(s(X), Y)] =  [1] X + [3] Y + [0]           
                                 >= [1] X + [1] Y + [0]           
                                 =  [s(add(X, Y))]                
                                                                  
              [a__first(X1, X2)] =  [1] X1 + [1] X2 + [1]         
                                 >= [1] X1 + [1] X2 + [1]         
                                 =  [first(X1, X2)]               
                                                                  
              [a__first(0(), X)] =  [1] X + [3]                   
                                 >  [1]                           
                                 =  [nil()]                       
                                                                  
    [a__first(s(X), cons(Y, Z))] =  [1] X + [1] Y + [1] Z + [1]   
                                 >= [1] X + [1] Y + [1] Z + [1]   
                                 =  [cons(Y, first(X, Z))]        
                                                                  
                    [a__from(X)] =  [3] X + [0]                   
                                 >= [2] X + [0]                   
                                 =  [cons(X, from(s(X)))]         
                                                                  
                    [a__from(X)] =  [3] X + [0]                   
                                 >= [1] X + [0]                   
                                 =  [from(X)]                     
                                                                  

We return to the main proof.

We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).

Strict Trs:
  { a__and(X1, X2) -> and(X1, X2)
  , a__and(true(), X) -> mark(X)
  , a__and(false(), Y) -> false()
  , mark(and(X1, X2)) -> a__and(mark(X1), X2) }
Weak Trs:
  { mark(true()) -> true()
  , mark(false()) -> false()
  , mark(0()) -> 0()
  , mark(s(X)) -> s(X)
  , mark(add(X1, X2)) -> a__add(mark(X1), X2)
  , mark(nil()) -> nil()
  , mark(cons(X1, X2)) -> cons(X1, X2)
  , mark(first(X1, X2)) -> a__first(mark(X1), mark(X2))
  , mark(from(X)) -> a__from(X)
  , mark(if(X1, X2, X3)) -> a__if(mark(X1), X2, X3)
  , a__if(X1, X2, X3) -> if(X1, X2, X3)
  , a__if(true(), X, Y) -> mark(X)
  , a__if(false(), X, Y) -> mark(Y)
  , a__add(X1, X2) -> add(X1, X2)
  , a__add(0(), X) -> mark(X)
  , a__add(s(X), Y) -> s(add(X, Y))
  , a__first(X1, X2) -> first(X1, X2)
  , a__first(0(), X) -> nil()
  , a__first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
  , a__from(X) -> cons(X, from(s(X)))
  , a__from(X) -> from(X) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^1))

We use the processor 'matrix interpretation of dimension 1' to
orient following rules strictly.

Trs:
  { a__and(true(), X) -> mark(X)
  , a__and(false(), Y) -> false()
  , mark(and(X1, X2)) -> a__and(mark(X1), X2) }

The induced complexity on above rules (modulo remaining rules) is
YES(?,O(n^1)) . These rules are moved into the corresponding weak
component(s).

Sub-proof:
----------
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA).
  
       [a__and](x1, x2) = [1] x1 + [2] x2 + [2]         
                                                        
                 [true] = [2]                           
                                                        
             [mark](x1) = [2] x1 + [0]                  
                                                        
                [false] = [2]                           
                                                        
    [a__if](x1, x2, x3) = [1] x1 + [2] x2 + [2] x3 + [0]
                                                        
       [a__add](x1, x2) = [1] x1 + [2] x2 + [0]         
                                                        
                    [0] = [3]                           
                                                        
                [s](x1) = [1] x1 + [0]                  
                                                        
          [add](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
     [a__first](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
                  [nil] = [3]                           
                                                        
         [cons](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
        [first](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
          [a__from](x1) = [2] x1 + [0]                  
                                                        
             [from](x1) = [1] x1 + [0]                  
                                                        
          [and](x1, x2) = [1] x1 + [1] x2 + [2]         
                                                        
       [if](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [0]
  
  This order satisfies the following ordering constraints:
  
                [a__and(X1, X2)] =  [1] X1 + [2] X2 + [2]         
                                 >= [1] X1 + [1] X2 + [2]         
                                 =  [and(X1, X2)]                 
                                                                  
             [a__and(true(), X)] =  [2] X + [4]                   
                                 >  [2] X + [0]                   
                                 =  [mark(X)]                     
                                                                  
            [a__and(false(), Y)] =  [2] Y + [4]                   
                                 >  [2]                           
                                 =  [false()]                     
                                                                  
                  [mark(true())] =  [4]                           
                                 >  [2]                           
                                 =  [true()]                      
                                                                  
                 [mark(false())] =  [4]                           
                                 >  [2]                           
                                 =  [false()]                     
                                                                  
                     [mark(0())] =  [6]                           
                                 >  [3]                           
                                 =  [0()]                         
                                                                  
                    [mark(s(X))] =  [2] X + [0]                   
                                 >= [1] X + [0]                   
                                 =  [s(X)]                        
                                                                  
             [mark(add(X1, X2))] =  [2] X1 + [2] X2 + [0]         
                                 >= [2] X1 + [2] X2 + [0]         
                                 =  [a__add(mark(X1), X2)]        
                                                                  
                   [mark(nil())] =  [6]                           
                                 >  [3]                           
                                 =  [nil()]                       
                                                                  
            [mark(cons(X1, X2))] =  [2] X1 + [2] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [cons(X1, X2)]                
                                                                  
           [mark(first(X1, X2))] =  [2] X1 + [2] X2 + [0]         
                                 >= [2] X1 + [2] X2 + [0]         
                                 =  [a__first(mark(X1), mark(X2))]
                                                                  
                 [mark(from(X))] =  [2] X + [0]                   
                                 >= [2] X + [0]                   
                                 =  [a__from(X)]                  
                                                                  
             [mark(and(X1, X2))] =  [2] X1 + [2] X2 + [4]         
                                 >  [2] X1 + [2] X2 + [2]         
                                 =  [a__and(mark(X1), X2)]        
                                                                  
          [mark(if(X1, X2, X3))] =  [2] X1 + [2] X2 + [2] X3 + [0]
                                 >= [2] X1 + [2] X2 + [2] X3 + [0]
                                 =  [a__if(mark(X1), X2, X3)]     
                                                                  
             [a__if(X1, X2, X3)] =  [1] X1 + [2] X2 + [2] X3 + [0]
                                 >= [1] X1 + [1] X2 + [1] X3 + [0]
                                 =  [if(X1, X2, X3)]              
                                                                  
           [a__if(true(), X, Y)] =  [2] X + [2] Y + [2]           
                                 >  [2] X + [0]                   
                                 =  [mark(X)]                     
                                                                  
          [a__if(false(), X, Y)] =  [2] X + [2] Y + [2]           
                                 >  [2] Y + [0]                   
                                 =  [mark(Y)]                     
                                                                  
                [a__add(X1, X2)] =  [1] X1 + [2] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [add(X1, X2)]                 
                                                                  
                [a__add(0(), X)] =  [2] X + [3]                   
                                 >  [2] X + [0]                   
                                 =  [mark(X)]                     
                                                                  
               [a__add(s(X), Y)] =  [1] X + [2] Y + [0]           
                                 >= [1] X + [1] Y + [0]           
                                 =  [s(add(X, Y))]                
                                                                  
              [a__first(X1, X2)] =  [1] X1 + [1] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [first(X1, X2)]               
                                                                  
              [a__first(0(), X)] =  [1] X + [3]                   
                                 >= [3]                           
                                 =  [nil()]                       
                                                                  
    [a__first(s(X), cons(Y, Z))] =  [1] X + [1] Y + [1] Z + [0]   
                                 >= [1] X + [1] Y + [1] Z + [0]   
                                 =  [cons(Y, first(X, Z))]        
                                                                  
                    [a__from(X)] =  [2] X + [0]                   
                                 >= [2] X + [0]                   
                                 =  [cons(X, from(s(X)))]         
                                                                  
                    [a__from(X)] =  [2] X + [0]                   
                                 >= [1] X + [0]                   
                                 =  [from(X)]                     
                                                                  

We return to the main proof.

We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).

Strict Trs: { a__and(X1, X2) -> and(X1, X2) }
Weak Trs:
  { a__and(true(), X) -> mark(X)
  , a__and(false(), Y) -> false()
  , mark(true()) -> true()
  , mark(false()) -> false()
  , mark(0()) -> 0()
  , mark(s(X)) -> s(X)
  , mark(add(X1, X2)) -> a__add(mark(X1), X2)
  , mark(nil()) -> nil()
  , mark(cons(X1, X2)) -> cons(X1, X2)
  , mark(first(X1, X2)) -> a__first(mark(X1), mark(X2))
  , mark(from(X)) -> a__from(X)
  , mark(and(X1, X2)) -> a__and(mark(X1), X2)
  , mark(if(X1, X2, X3)) -> a__if(mark(X1), X2, X3)
  , a__if(X1, X2, X3) -> if(X1, X2, X3)
  , a__if(true(), X, Y) -> mark(X)
  , a__if(false(), X, Y) -> mark(Y)
  , a__add(X1, X2) -> add(X1, X2)
  , a__add(0(), X) -> mark(X)
  , a__add(s(X), Y) -> s(add(X, Y))
  , a__first(X1, X2) -> first(X1, X2)
  , a__first(0(), X) -> nil()
  , a__first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
  , a__from(X) -> cons(X, from(s(X)))
  , a__from(X) -> from(X) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^1))

We use the processor 'matrix interpretation of dimension 1' to
orient following rules strictly.

Trs: { a__and(X1, X2) -> and(X1, X2) }

The induced complexity on above rules (modulo remaining rules) is
YES(?,O(n^1)) . These rules are moved into the corresponding weak
component(s).

Sub-proof:
----------
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA).
  
       [a__and](x1, x2) = [1] x1 + [3] x2 + [3]         
                                                        
                 [true] = [1]                           
                                                        
             [mark](x1) = [3] x1 + [1]                  
                                                        
                [false] = [2]                           
                                                        
    [a__if](x1, x2, x3) = [1] x1 + [3] x2 + [3] x3 + [0]
                                                        
       [a__add](x1, x2) = [1] x1 + [3] x2 + [0]         
                                                        
                    [0] = [2]                           
                                                        
                [s](x1) = [1] x1 + [0]                  
                                                        
          [add](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
     [a__first](x1, x2) = [1] x1 + [1] x2 + [2]         
                                                        
                  [nil] = [0]                           
                                                        
         [cons](x1, x2) = [1] x1 + [1] x2 + [0]         
                                                        
        [first](x1, x2) = [1] x1 + [1] x2 + [1]         
                                                        
          [a__from](x1) = [3] x1 + [0]                  
                                                        
             [from](x1) = [1] x1 + [0]                  
                                                        
          [and](x1, x2) = [1] x1 + [1] x2 + [1]         
                                                        
       [if](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [0]
  
  This order satisfies the following ordering constraints:
  
                [a__and(X1, X2)] =  [1] X1 + [3] X2 + [3]         
                                 >  [1] X1 + [1] X2 + [1]         
                                 =  [and(X1, X2)]                 
                                                                  
             [a__and(true(), X)] =  [3] X + [4]                   
                                 >  [3] X + [1]                   
                                 =  [mark(X)]                     
                                                                  
            [a__and(false(), Y)] =  [3] Y + [5]                   
                                 >  [2]                           
                                 =  [false()]                     
                                                                  
                  [mark(true())] =  [4]                           
                                 >  [1]                           
                                 =  [true()]                      
                                                                  
                 [mark(false())] =  [7]                           
                                 >  [2]                           
                                 =  [false()]                     
                                                                  
                     [mark(0())] =  [7]                           
                                 >  [2]                           
                                 =  [0()]                         
                                                                  
                    [mark(s(X))] =  [3] X + [1]                   
                                 >  [1] X + [0]                   
                                 =  [s(X)]                        
                                                                  
             [mark(add(X1, X2))] =  [3] X1 + [3] X2 + [1]         
                                 >= [3] X1 + [3] X2 + [1]         
                                 =  [a__add(mark(X1), X2)]        
                                                                  
                   [mark(nil())] =  [1]                           
                                 >  [0]                           
                                 =  [nil()]                       
                                                                  
            [mark(cons(X1, X2))] =  [3] X1 + [3] X2 + [1]         
                                 >  [1] X1 + [1] X2 + [0]         
                                 =  [cons(X1, X2)]                
                                                                  
           [mark(first(X1, X2))] =  [3] X1 + [3] X2 + [4]         
                                 >= [3] X1 + [3] X2 + [4]         
                                 =  [a__first(mark(X1), mark(X2))]
                                                                  
                 [mark(from(X))] =  [3] X + [1]                   
                                 >  [3] X + [0]                   
                                 =  [a__from(X)]                  
                                                                  
             [mark(and(X1, X2))] =  [3] X1 + [3] X2 + [4]         
                                 >= [3] X1 + [3] X2 + [4]         
                                 =  [a__and(mark(X1), X2)]        
                                                                  
          [mark(if(X1, X2, X3))] =  [3] X1 + [3] X2 + [3] X3 + [1]
                                 >= [3] X1 + [3] X2 + [3] X3 + [1]
                                 =  [a__if(mark(X1), X2, X3)]     
                                                                  
             [a__if(X1, X2, X3)] =  [1] X1 + [3] X2 + [3] X3 + [0]
                                 >= [1] X1 + [1] X2 + [1] X3 + [0]
                                 =  [if(X1, X2, X3)]              
                                                                  
           [a__if(true(), X, Y)] =  [3] X + [3] Y + [1]           
                                 >= [3] X + [1]                   
                                 =  [mark(X)]                     
                                                                  
          [a__if(false(), X, Y)] =  [3] X + [3] Y + [2]           
                                 >  [3] Y + [1]                   
                                 =  [mark(Y)]                     
                                                                  
                [a__add(X1, X2)] =  [1] X1 + [3] X2 + [0]         
                                 >= [1] X1 + [1] X2 + [0]         
                                 =  [add(X1, X2)]                 
                                                                  
                [a__add(0(), X)] =  [3] X + [2]                   
                                 >  [3] X + [1]                   
                                 =  [mark(X)]                     
                                                                  
               [a__add(s(X), Y)] =  [1] X + [3] Y + [0]           
                                 >= [1] X + [1] Y + [0]           
                                 =  [s(add(X, Y))]                
                                                                  
              [a__first(X1, X2)] =  [1] X1 + [1] X2 + [2]         
                                 >  [1] X1 + [1] X2 + [1]         
                                 =  [first(X1, X2)]               
                                                                  
              [a__first(0(), X)] =  [1] X + [4]                   
                                 >  [0]                           
                                 =  [nil()]                       
                                                                  
    [a__first(s(X), cons(Y, Z))] =  [1] X + [1] Y + [1] Z + [2]   
                                 >  [1] X + [1] Y + [1] Z + [1]   
                                 =  [cons(Y, first(X, Z))]        
                                                                  
                    [a__from(X)] =  [3] X + [0]                   
                                 >= [2] X + [0]                   
                                 =  [cons(X, from(s(X)))]         
                                                                  
                    [a__from(X)] =  [3] X + [0]                   
                                 >= [1] X + [0]                   
                                 =  [from(X)]                     
                                                                  

We return to the main proof.

We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(1)).

Weak Trs:
  { a__and(X1, X2) -> and(X1, X2)
  , a__and(true(), X) -> mark(X)
  , a__and(false(), Y) -> false()
  , mark(true()) -> true()
  , mark(false()) -> false()
  , mark(0()) -> 0()
  , mark(s(X)) -> s(X)
  , mark(add(X1, X2)) -> a__add(mark(X1), X2)
  , mark(nil()) -> nil()
  , mark(cons(X1, X2)) -> cons(X1, X2)
  , mark(first(X1, X2)) -> a__first(mark(X1), mark(X2))
  , mark(from(X)) -> a__from(X)
  , mark(and(X1, X2)) -> a__and(mark(X1), X2)
  , mark(if(X1, X2, X3)) -> a__if(mark(X1), X2, X3)
  , a__if(X1, X2, X3) -> if(X1, X2, X3)
  , a__if(true(), X, Y) -> mark(X)
  , a__if(false(), X, Y) -> mark(Y)
  , a__add(X1, X2) -> add(X1, X2)
  , a__add(0(), X) -> mark(X)
  , a__add(s(X), Y) -> s(add(X, Y))
  , a__first(X1, X2) -> first(X1, X2)
  , a__first(0(), X) -> nil()
  , a__first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
  , a__from(X) -> cons(X, from(s(X)))
  , a__from(X) -> from(X) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(1))

Empty rules are trivially bounded

Hurray, we answered YES(O(1),O(n^1))